package com.andong.service.impl;

import com.andong.domain.pojo.Result;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.andong.domain.entity.MockTestScore;
import com.andong.service.MockTestScoreService;
import com.andong.mapper.MockTestScoreMapper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 王海云
 * @description 针对表【mock_test_score(学员模拟考试历史成绩表)】的数据库操作Service实现
 * @createDate 2024-02-13 10:27:08
 */
@Service
public class MockTestScoreServiceImpl extends ServiceImpl<MockTestScoreMapper, MockTestScore>
        implements MockTestScoreService {

    @Override
    public Result getScoreById(Long id) {
        List<MockTestScore> list = lambdaQuery()
                .eq(MockTestScore::getStudentId, id)
                .orderByAsc(MockTestScore::getSubject)
                .orderByAsc(MockTestScore::getCreateTime)
                .list();
        return Result.success(list);
    }
}




